
const path = require('path');
const fs = require('fs');

const {info} = console;


function test0(){
    const savePointFilePath = 'E:\\gitee\\mxDev\\.vscode\\extensions.json';
    const dir = path.dirname(savePointFilePath);
    //文件名
    const fileName = path.relative(dir,savePointFilePath);
    //文件名去掉扩展名
    const targetName = fileName.substring(0, fileName.indexOf('.'));
    info(fileName, targetName);
}

function test1(){
    fs.stat('E:\\gitee\\mxDev\\.vscode\\extensions1.json',(err,stats)=>{
        info(err,stats);
    });

    //info(path.dirname('E:\\gitee\\mxDev\\.vscode'));
}

function test2(){
    const c= fs.readFileSync('E:\\gitee\\mxDev\\.vscode\\extensions.json').toString()
    info(c.split(/\n|\r|\n\r/));
}

test2();

